export default {
  namespaced: true,
  state: {
    gasInfo: JSON.parse(sessionStorage.getItem('gasInfo')) || {}, // 选中的油站信息
  },
  mutations: {
    SET_GAS: (state, data) => {
      sessionStorage.setItem('gasInfo', JSON.stringify(data[0]))
      state.gasInfo = JSON.parse(sessionStorage.getItem('gasInfo'))
    }
  },
  actions: {
    setGasInfo ({ commit }, gasInfo) {
      commit('SET_GAS', gasInfo)
    }
  }
}